package com.itheima.service.impl;

import com.itheima.mapper.TaskMapper;
import com.itheima.pojo.Task;
import com.itheima.service.TaskService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
public class TaskServiceImpl implements TaskService {
    @Autowired
    private TaskMapper taskMapper;

    @Override
    public void addTask(Task task) {
        taskMapper.insert(task);
    }

    @Override
    public List<Task> getTaskList(Task task) {

        return taskMapper.getTaskList(task);
    }

    @Override
    public void submit(Task task) {
        taskMapper.submit(task);
    }
}
